package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

var inputReader *bufio.Reader
var input string
var err error

func main() {
	for {
		inputReader = bufio.NewReader(os.Stdin)
		input, err = inputReader.ReadString('#')
		if err == nil {
			input = strings.Replace(input, " ", "", -1)
			input = strings.Replace(input, "\n", "", -1)
			input = strings.Replace(input, "#", "", -1)
			fmt.Printf(input)
			//for _, c := range input {
			//	if c != ' ' && c != '#' {
			//		fmt.Print(c)
			//	}
			//}
		}
	}
}
